package com.xja.controller;
import com.xja.pojo.Type;
import com.xja.service.TypeService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.List;

@Controller
@RequestMapping("type")
public class TypeController {
    @Reference(url = "dubbo://localhost:20883")
    TypeService typeService;

    @RequestMapping("toAddType")
    public String login(Model model){
       List<Type> typeList = typeService.getTypeList();
       model.addAttribute("typeList",typeList);
       return "/admin/food_add";
    }
}
